home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / pxfsetuid.z / pxfsetuid
Encoding:
Text File  |  2002-10-03  |  4.0 KB  |  93 lines

  1. PXFSETUID(3F)                                         Last changed: 1-22-99
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFSSEETTUUIIDD - Sets user ID
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSUUBBRROOUUTTIINNEE PPXXFFSSEETTUUIIDD ((_i_u_i_d,, _i_e_r_r_o_r))
  9.      IINNTTEEGGEERR _i_u_i_d,, _i_e_r_r_o_r
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. SSTTAANNDDAARRDDSS
  15.      IEEE standard interface for FORTRAN 77
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  19.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  20.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  21.      F77 compiler.
  22.  
  23.      The PPXXFFSSEETTUUIIDD routine uses the sseettuuiidd(2) function to set the real user
  24.      ID, effective user ID, and saved set user IDs of the calling process.
  25.      The following conditions determine the setting of an ID. They are
  26.      checked in the following order, and the first condition that is true
  27.      is applied:
  28.  
  29.      * If the process has appropriate privilege, the real, effective, and
  30.        saved set user IDs are all set to _i_u_i_d.
  31.  
  32.      * If the ID is equal to either the real user ID, the effective user
  33.        ID, or the saved set user, ID is set to _i_u_i_d.
  34.  
  35.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  36.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  37.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  38.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  39.      IRIX, the default kind is KKIINNDD==44.
  40.  
  41.      The following is a list of valid arguments for this routine:
  42.  
  43.      _i_u_i_d      An input integer variable used to replace the current user
  44.                ID for the calling process.
  45.  
  46.      _i_e_r_r_o_r    An output integer variable that contains zero if PPXXFFSSEETTUUIIDD
  47.                was successful or nonzero if PPXXFFSSEETTUUIIDD was not successful.
  48.  
  49.      This routine may return EEIINNVVAALL if the value of the _i_u_i_d argument is
  50.      out of range.  or EEPPEERRMM if the process does not have the appropriate
  51.      privileges and if _i_u_i_d does not match the real user ID.
  52.  
  53. NNOOTTEESS
  54.      On a UNICOS multilevel security (MLS) system, a process with the
  55.      effective privileges shown is granted the following abilities:
  56.  
  57.      PPrriivviilleeggee                DDeessccrriippttiioonn
  58.  
  59.      PPRRIIVV__SSEETTGGIIDD              The process may set the real user ID,
  60.                               effective user ID, and saved set-user-ID.
  61.  
  62.      On a UNICOS non-MLS system or a UNICOS MLS system with PPRRIIVV__SSUU
  63.      enabled, the super user may set the real user ID, effective user ID,
  64.      and saved set-user-ID.
  65.  
  66. EEXXAAMMPPLLEESS
  67.      In this example, the current user ID for the current process will be
  68.      obtained by calling PPXXFFGGEETTUUIIDD and then seting the user ID for the
  69.      current process using the group ID returned by PPXXFFGGEETTUUIIDD.
  70.  
  71.           program pxftest
  72.           integer iuid, ierror
  73.  
  74.           CALL PXFGETUID(iuid, ierror)
  75.              if (ierror .eq. 0) then
  76.                 CALL PXFSETUID(iuid, ierror)
  77.                 if (ierror .eq. 0) then
  78.                    print *,'user id set to ',iuid
  79.                 else
  80.                    print *,'user id not set to ',iuid,' because of error'
  81.                 endif
  82.              else
  83.                 print *,'could not obtain user ID  error = ',ierror
  84.              endif
  85.           end
  86.  
  87. SSEEEE AALLSSOO
  88.      sseettuuiidd(2)
  89.      PPXXFFGGEETTUUIIDD(3F)
  90.  
  91.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed
  92.      version of this man page.
  93.